package com.abe.hello.domain;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.abe.hello.base.exception.CommonException;
import com.abe.hello.base.exception.CoreExceptionController;

@ResponseBody
@RestController
public class HelloController extends CoreExceptionController {

	/** ERROR页面 */
	@RequestMapping("/error_1")
	public String error_1() throws Exception {
		throw new Exception("errorerror1");
	}

	/** 自定义异常，返回JSON */
	@RequestMapping("/error_2")
	public String error_2() throws CommonException {
		throw new CommonException("发生错误2");
	}

	/** 父级处理异常 */
	@RequestMapping("/error_3")
	public String error_3(boolean is1) {
		return "" + 1 / 0;
	}
}
